import request from '@/config/axios'

// 招聘内容 API
export const ContentJobApi = {
  // 查询招聘内容分页
  getContentJobPage: async (params: any) => {
    return await request.get({ url: `/cms/content-job/page`, params })
  },
  getContentJob: async (id: number) => {
    return await request.get({ url: `/cms/content-job/get?id=${id}` })
  },

  // 新增招聘内容
  createContentJob: async (data: any) => {
    return await request.post({ url: `/cms/content-job/create`, data })
  },

  // 修改招聘内容
  updateContentJob: async (data: any) => {
    return await request.put({ url: `/cms/content-job/update`, data })
  },

  // 删除招聘内容
  deleteContentJob: async (id: number) => {
    return await request.delete({ url: `/cms/content-job/delete?id=` + id })
  },

  // 导出招聘内容 Excel
  exportContentJob: async (params) => {
    return await request.download({ url: `/cms/content-job/export-excel`, params })
  }
}
